import request from '@/utils/request'
// 新增
export function add(data) {
  return request({
    url: 'api/activeCustomerCoupon/addOrSave',
    method: 'post',
    data
  })
}
// 删除
export function del(ids) {
  return request({
    url: 'api/activeCustomerCoupon/',
    method: 'delete',
    data: ids
  })
}
// 编辑
export function edit(data) {
  return request({
    url: 'api/activeCustomerCoupon/addOrSave',
    method: 'post',
    data
  })
}
// 复制
export function copy(data) {
  return request({
    url: 'api/activeCustomerCoupon/copy',
    method: 'post',
    data
  })
}
// 导出
export function exportDe(data) {
  return request({
    url: 'api/activeCustomerCoupon/export',
    method: 'post',
    data
  })
}
// 导入
export function importDe(data) {
  return request({
    url: 'api/activeCustomerCoupon/import',
    method: 'post',
    data
  })
}

export function enableOrDisable(data) {
  const obj = {
    url: 'api/activeCustomerCoupon/enableOrDisable',
    method: 'post',
    data
  }
  return request(obj)
}

export default { add, edit, copy, exportDe, importDe, del, enableOrDisable }
